package com.ssyt.common.vo;

import java.util.Calendar;
import java.util.Date;
 /*
  * 职位信息表
  * 
  */
public class Position {
	private int id;//id
	private int userId;//用户ID 对应user表
	private String name;//职位名称
	private int salaryBegin;// 起始薪资
	private int salaryEnd;//最高工资
	private String provinceCode;//工作所在省
	private String cityCode;//工作所在城市
	private int workExperience;//工作经验
	private int education;//学历要求
	private Date publishTime;//职位发布时间
	private String job;//
	private String duty;
	private String treatment;
	private int validDays;

	// 扩展字段
	private String company$name;
	private String trade$name;
	private String company$nature;
	private String company$purpose;
	private String city$name;
	private String province$name;
	
	private String workExperienceStr;
	private String educationStr;
	private String[] treatments;
	private int allResumeDeliveryCount;
	private int unreadResumeCount;
	private int unhandleResumeCount;
	private Date outDate;

	public String getCompany$nature() {
		String companyNature = "";
		switch (company$nature) {
		case "1":
			companyNature = "民营企业";
			break;
		case "2":
			companyNature = "国有企业";
			break;
		case "3":
			companyNature = "外资企业";
			break;
		default:
			companyNature = "其它";
			break;
		}
		return companyNature;
	}

	public String getWorkExperienceStr() {
		String workExperienceStr = "";
		switch (workExperience) {
		case 1:
			workExperienceStr = "实习生";
			break;
		case 2:
			workExperienceStr = "应届毕业生";
			break;
		case 3:
			workExperienceStr = "1~3年";
			break;
		case 4:
			workExperienceStr = "3~5年";
			break;
		case 5:
			workExperienceStr = "5~10年";
			break;
		case 6:
			workExperienceStr = "10年以上";
			break;
		default:
			workExperienceStr = "经验不限";
			break;
		}
		return workExperienceStr;
	}

	public String getEducationStr() {
		String educationStr = "";
		switch (education) {
		case 1:
			educationStr = "大专";
			break;
		case 2:
			educationStr = "本科";
			break;
		case 3:
			educationStr = "硕士";
			break;
		case 4:
			educationStr = "博士";
			break;
		case 5:
			educationStr = "其它";
			break;
		default:
			educationStr = "学历不限";
			break;
		}
		return educationStr;
	}

	public Date getOutDate() {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(publishTime);
		calendar.add(Calendar.DATE, validDays);
		return calendar.getTime();
	}

	public void setOutDate(Date outDate) {
		this.outDate = outDate;
	}

	public String[] getTreatments() {
		return treatment.split(",");
	}

	public void setTreatments(String[] treatments) {
		this.treatments = treatments;
	}

	public String getTreatment() {
		return treatment;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getSalaryBegin() {
		return salaryBegin;
	}

	public void setSalaryBegin(int salaryBegin) {
		this.salaryBegin = salaryBegin;
	}

	public int getSalaryEnd() {
		return salaryEnd;
	}

	public void setSalaryEnd(int salaryEnd) {
		this.salaryEnd = salaryEnd;
	}

	public String getProvinceCode() {
		return provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public int getWorkExperience() {
		return workExperience;
	}

	public void setWorkExperience(int workExperience) {
		this.workExperience = workExperience;
	}

	public int getEducation() {
		return education;
	}

	public void setEducation(int education) {
		this.education = education;
	}

	public Date getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getDuty() {
		return duty;
	}

	public void setDuty(String duty) {
		this.duty = duty;
	}

	public void setTreatment(String treatment) {
		this.treatment = treatment;
	}

	public int getValidDays() {
		return validDays;
	}

	public void setValidDays(int validDays) {
		this.validDays = validDays;
	}

	public String getCompany$name() {
		return company$name;
	}

	public void setCompany$name(String company$name) {
		this.company$name = company$name;
	}

	public String getTrade$name() {
		return trade$name;
	}

	public void setTrade$name(String trade$name) {
		this.trade$name = trade$name;
	}

	public void setCompany$nature(String company$nature) {
		this.company$nature = company$nature;
	}

	public String getCompany$purpose() {
		return company$purpose;
	}

	public void setCompany$purpose(String company$purpose) {
		this.company$purpose = company$purpose;
	}

	public String getCity$name() {
		return city$name;
	}

	public void setCity$name(String city$name) {
		this.city$name = city$name;
	}

	public void setWorkExperienceStr(String workExperienceStr) {
		this.workExperienceStr = workExperienceStr;
	}

	public void setEducationStr(String educationStr) {
		this.educationStr = educationStr;
	}

	public int getAllResumeDeliveryCount() {
		return allResumeDeliveryCount;
	}

	public void setAllResumeDeliveryCount(int allResumeDeliveryCount) {
		this.allResumeDeliveryCount = allResumeDeliveryCount;
	}

	public int getUnreadResumeCount() {
		return unreadResumeCount;
	}

	public void setUnreadResumeCount(int unreadResumeCount) {
		this.unreadResumeCount = unreadResumeCount;
	}

	public int getUnhandleResumeCount() {
		return unhandleResumeCount;
	}

	public void setUnhandleResumeCount(int unhandleResumeCount) {
		this.unhandleResumeCount = unhandleResumeCount;
	}

	public String getProvince$name() {
		return province$name;
	}

	public void setProvince$name(String province$name) {
		this.province$name = province$name;

	}

}
